package ru.jexp.rcp.supply.actions.wizards;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IWorkbenchWindow;

import ru.jexp.rcp.supply.beans.project.NewWizardProj;
import ru.jexp.rcp.supply.img.JExpImageLink;
import ru.jexp.rcp.supply.mui.JExpSupplyMessages;

public class ActionNewWizardProj extends Action
{

	public static final String ID = "ru.jexp.rcp.supply.actions.wizards.actionnewwizardproj";
	private IWorkbenchWindow window;

	public ActionNewWizardProj(IWorkbenchWindow window) {
		super();
		this.window = window;
		setId(ID);
		setActionDefinitionId(ID);
		setText(JExpSupplyMessages.Projec_wizard_action_text);
		setToolTipText(JExpSupplyMessages.Projec_wizard_action_tooltip);
		setImageDescriptor(JExpImageLink.getImageDescriptor(JExpImageLink.PROJ));
	}
	
	@Override
	public void run()
	{
		NewWizardProj wizard = new NewWizardProj();
		wizard.init(window.getWorkbench(), null);
		new WizardDialog(window.getShell(), wizard).open();
	}
}
